#pragma once
#define WIN32_LEAN_AND_MEAN
#define _CRT_SECURE_NO_WARNINGS
#include <windows.h>
#include <d3d9.h>
#include "resource.h"

/**
 * Klasa tekstury.
 *
 * @author Krzysztof Klein
 * @version 0.1
 */
class Texture : public Resource
{
	LPDIRECT3DTEXTURE9 texture;

public:

	Texture() : Resource(), texture(NULL) { }
	~Texture() { if(texture) texture->Release(); }

	LPDIRECT3DTEXTURE9 getTexture() const { return texture; }

	virtual int beginDrawing() const { return 1; }
	virtual void endDrawing() const { }
	virtual void beginPass(int pass) const { }
	virtual void endPass() const { }

private:

	/**
	 * Typ zasobu
	 */
	Type getType() const { return Resource::TextureResource; }

	/**
	 * Laduje zasob.
	 */
	virtual bool load();
	/**
	 * ...
	 */
	virtual void unload();
};